from core.support import set_cutscene
from core.item import Item
from items.business_card import business_card
from items.ATT import ATT
from items.HP import HP
from items.Hasbro import Hasbro
from items.Google import Google
from core.action import Action

class Resume(Item):
    def __init__(self):
        Item.__init__(self, "Resume")    # do basic initialization for every item
        
        self.add_action(Submit_Resume)
           
    def get_description(self):
            return "FCC approved Resume"

# define actions for this item

class Submit_Resume(Action):
    def __init__(self):
        Action.__init__(self, "Submit_Resume")    # do basic initialization for every action
    
    # return description of action (used in label on webpage)
    def get_description(self):
        return "Submit Resume"
    
    # return http method to use when user clicks on this action
    # use "get" if just moving to another room.  if changing something
    # like the state of an inventory item or room then use "post"
    def get_method(self):
        return "post"
    
    # only works in basement. add cutscene
    def do_action(self,game,room,request):
        if room.get_id() == 'career_fair':
            if room.careerfair_locked:
                set_cutscene("You present your professionally done resume to the person at the desk.")
                room.careerfair_locked = False
                room.add_item(business_card())
                room.add_item(ATT())
                room.add_item(HP())
                room.add_item(Hasbro())
                room.add_item(Google())
        else:
            set_cutscene("There is nowhere to submit your resume here.")
        return